var regist = new Vue({
		el:"#regist",
		data:{
			username: '',
			email: '',
			password: '',
			compass: '',
		},
		methods:{
			regist:function(){
				var that = this;
				if(this.username == null || this.email == null || this.password == null || this.compass == null){
					alert("不能为空！");
					return false;
				}
				if(this.password != this.compass){
					alert("两次密码不一致！");
					return false;
				}
				axios.post(base_ure+'/user/regist', {
					username: that.username,
				    email: that.email,
				    password: that.password
				})
				.then(function (response) {
				 if(response.data.code == "200"){
					 alert("注册成功！");
					 window.location.href = "form-modern-login.html";
				 }else{
					 alert("注册失败，请重试！");
					 return false;
				 }
				})
				.catch(function (error) {
				 console.log(error);
				 alert("出错了，请重试！");
				});
			},
		},
		mounted() {
			
		},
})